/*
 * @Author: Clark
 * @Email: haixuanwoTxh@gmail.com
 * @Date: 2023-01-04 15:44:47
 * @LastEditors: Clark
 * @LastEditTime: 2023-01-04 15:48:19
 * @Description: file content
 */

#include "apue.h"
#include <fcntl.h>

int main()
{
    char fileName[] = {"tempfile"};
    if (open(fileName, O_RDWR) < 0)
    {
        err_sys("open error");
    }

    if (unlink(fileName) < 0)
    {
        err_sys("unlink error");
    }

    printf("file unlinked: %s\n", fileName);
    sleep(15);
    printf("done\n");

    exit(0);
}
